import { http } from '@/tool/utils'
import { iPb } from '@/protobuf/interface'


export function ReadConfig():Promise<iPb.IDbConfig> {
    return http.post("ReadConfig", iPb.DbConfig.create())
}

export function SaveConfig(data: iPb.IDbConfig):Promise<iPb.Admin.ISaveConfigResponse> {
    return http.post("SaveConfig", iPb.DbConfig.create(data))
}

export function SendTestEmail(data: iPb.Admin.ISendTestEmailRequest):Promise<iPb.Admin.ISendTestEmailResponse> {
    return http.post("SendTestEmail", iPb.Admin.SendTestEmailRequest.create(data))
}